package ynu.edu.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import ynu.edu.Entity.User;

@FeignClient(name = "provider-service")
public interface GetProviderService {
    @GetMapping("user/getUserById/{userId}")
    User getUserInfo(@PathVariable("userId") Integer userId);

    @PutMapping("user//updateUserName/{newUserName}")
    User updateUserName(@PathVariable("newUserName") String newUserName);

    @PostMapping("user/addUser/{userId}")
    User addUser(@PathVariable("userId") Integer userId);

    @DeleteMapping("user/deleteUser/{userId}")
    User deleteUser(@PathVariable("userId") Integer userId);
}
